package com.xxxx;

import com.xxxx.config.BeanConfig;
import com.xxxx.dao.BookDao;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * Created By ShaoXikai on 2022/7/20
 */
public class TestApp {

    @Test
    public void testAnno() {
        AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(BeanConfig.class);
        BookDao bookDao1 = ac.getBean(BookDao.class);
        BookDao bookDao2 = ac.getBean(BookDao.class);
        // bookDao1.d1();
        System.out.println(bookDao1);
        System.out.println(bookDao2);
        ac.close();
    }

}
